package wang.aweb.childcar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import wang.aweb.childcar.model.dao.ComrateLogMapper;
import wang.aweb.childcar.model.pojo.ComrateLog;
import wang.aweb.childcar.service.ComrateLogService;

import java.util.Date;

@Service
public class ComrateLogServiceImpl implements ComrateLogService {
    @Autowired
    private ComrateLogMapper comrateLogMapper;
    @Override
    public void add(Integer money,Integer agentId,Integer type,String orderNo){
        ComrateLog comrateLog=new ComrateLog();
        comrateLog.setMoney(money);
        comrateLog.setAgentId(agentId);
        comrateLog.setCreateTime(new Date());
        comrateLog.setOrderno(orderNo);
        comrateLog.setType(type);
        comrateLogMapper.insert(comrateLog);
    }
}
